package com.wiloon.java.network.network.nettyhttpserver.monitor;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by Roy on 2015/12/6;
 */
public class RequestCounter {
    public static AtomicInteger requestCounter = new AtomicInteger();

    public static long currentTime;

    public static void count() {
        requestCounter.incrementAndGet();
        currentTime = System.currentTimeMillis();
    }


    public static int getCount() {
        return requestCounter.get();
    }

    public static long getTime() {
        return currentTime;
    }
}
